package cn.edu.zafu.bigdata.lyq.work5;
import java.util.HashMap;
public class StudentGradeManger {
    private HashMap<String,Integer> studentGrades;
    public StudentGradeManger(){
        studentGrades = new HashMap<>();
    }
    public void addStudent(String name,int grade){
        studentGrades.put(name,grade);
    }
    public int getGrade(String name){
        return studentGrades.getOrDefault(name,-1);
    }
    public void removeStudent(String name){
        studentGrades.remove(name);
    }

}
